﻿@page
@model razor教程.Pages.IndexModel
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{

}

<html>
<head>
    <title>首页</title>
</head>

<body>
    <form method="post">
        @foreach (var contact in Model.Customers)
        {
            <p>@contact.Id</p>
            <p>@contact.Name</p>
            <p>
                <a asp-page="./Edit" asp-route-id="@contact.Id">编辑</a>
                <button type="submit" asp-page-handler="delete" asp-route-id="@contact.Id">删除</button>
                </p>
        }
    </form>

</body>
</html>